package com.tianqingwl.gsystem.common.vo;

public class FileUploadResultVo extends ResultVo{
    private String state;
    private String url;
    private String title;
    private String original;

    public static FileUploadResultVo success(String url,String title,String original,Object data){
        FileUploadResultVo fileUploadResultVo = new FileUploadResultVo();
        fileUploadResultVo.setState("SUCCESS");
        fileUploadResultVo.setSuccess(true);
        fileUploadResultVo.setUrl(url);
        fileUploadResultVo.setTitle(title);
        fileUploadResultVo.setOriginal(original);
        fileUploadResultVo.setData(data);
        return fileUploadResultVo;
    }

    public static FileUploadResultVo fail(String msg){
        FileUploadResultVo fileUploadResultVo = new FileUploadResultVo();
        fileUploadResultVo.setMsg(msg);
        fileUploadResultVo.setState("FAIL");
        fileUploadResultVo.setSuccess(false);
        return fileUploadResultVo;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getOriginal() {
        return original;
    }

    public void setOriginal(String original) {
        this.original = original;
    }
}
